const utils = {
    checkDevice: function() {
        let u = navigator.userAgent;
        let device = "";
        let deviceId = "";
        if(u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {
            device = 'Android';
            deviceId = '1';
        }
        if(u.indexOf('iPhone') > -1) {
            device = 'iPhone';
            deviceId = '2';
        }
        if(u.indexOf('Windows Phone') > -1) {
            device = 'WindowsPhone';
            deviceId = '3';
        }
        if(deviceId == '') {
            device = 'PC';
            deviceId = '4';
        }
        return deviceId;
    }
}

export default utils
